package com.lihuinch.test.dingtalk.eventsubscribe.handler;

import com.alibaba.fastjson.JSONObject;
import com.lihuinch.test.dingtalk.eventsubscribe.handler.response.DingTalkEventResponse;

/**
 * 。
 *
 * @author lihu
 * @date 2021-8-27 14:53
 * @since
 */
public interface DingTalkEventHandler<R extends DingTalkEventResponse> {

    /**
     * 子类都以这个作为springbean的开头
     */
    String DING_TALK_EVENT_HANDLER = "dingtalkEventHandler";

    R handleEvent(JSONObject param);


    static String getBeanId(String event) {
        return DING_TALK_EVENT_HANDLER + "_" + event;
    }
}
